<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <title>我的</title>
    <link rel="stylesheet" href="../../css/api.css">
    <link rel="stylesheet" href="../../css/vant.css">
    <link rel="stylesheet" href="../../css/main.css">
    <style>
        .right-share{
            position: absolute;
            right: .16rem;
            height: .44rem;
            font-size: .06rem;
            line-height: .44rem;
        }
    </style>
</head>

<body>
    <div class="app">
        <div class="common-header">
            <div class="iconfont goback" @click="back">&#xe66f;</div>
            <div class="title" v-text="title"></div>
            <div class="right-share" @click="share()">● ● ●</div>
        </div>
    </div>
    <script src="../../script/api.js"></script>
    <script src="../../script/flexible.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/vue.min.js"></script>
    <script src="../../script/iconfont.js"></script>
    <script src="../../script/vant.min.js"></script>
    <script src="../../script/common.js"></script>

    <script>
        apiready = function() {
            vm = new Vue({
                el: '.app',
                data: {
                    title: ''
                },
                created() {
                    const vm = this;
                    api.setFrameClient({
                        frameName: 'web_frm'
                    }, function(ret, err) {
                        switch (ret.state) {
                            case 0:
                                break;
                            case 1:
                                break;
                            case 2:
                                break;
                            case 3:
                                vm.title = ret.title;
                                break;
                            case 4:
                                break;
                            default:
                                break;
                        }
                    });
                },
                mounted() {
                  var header = $api.dom('.common-header');
                  var headerH = $api.fixStatusBar(header);
                  api.openFrame({
                    name: 'web_frm',
                    url: api.pageParam.url,
                    rect: {
                      marginTop: headerH,
                      marginBottom: 0,
                      w: 'auto'
                    },
                    pageParam: api.pageParam
                  });
                },
                methods: {
                    share(){
                        let vm = this
                        toReportOrShareDialog("WEBPAGE", api.pageParam.url, 2, vm.title)
                    },
                    back() {
                        api.closeWin();
                    }
                },
            })
        }
    </script>
</body>

</html>